duskersfandomcom-20200214-history
Console
The console is a command line interface and the most important input method in the game. It is used to control: drones, doors, ship upgrades, the boarding vessel, and the terminals, by using text based commands. Console Behavior The console features auto-completion. If you start typing a command, the rest of the command may appear highlighted. you can use TAB, SPACE, or ENTER to complete the command automatically (note that ENTER auto-completes and executes the command.) The console history can be scrolled through using (CTRL+UP/DOWN). this is useful for recalling a command quickly Chaining Commands Multiple commands can be chained together using a semi-colon [ ; ]. for example, navigate 1 r2; scan; gather all would navigate drone 1 to room r2, scan the room for any items, and gather any resources it finds. Note that navigate is a blocking command, meaning that any commands that come after it will wait until navigate is completed. if navigate is auto-canceled, any following commands will be skipped. Aliases Aliases are an important and powerful function of the console. Aliases are user-defined shortcuts that can be used to abbreviate commands, or chain together multiple commands under one name. To access the alias file, type 'alias'. The default alias file contains two aliases to demonstrate the file structure. begin=open a1; navigate 1 2 3 4 a1; generator 2 end=navigate 1 2 3 4 r1 Executing the 'begin' alias would do the same thing as executing 'open a1; navigate 1 2 3 4 a1; generator 2'. You can see how using aliases can simplify commonly used strings of commands. Arguments Aliases also support arguments, which data placeholders that tell the alias how to operate. This allows for the creation of powerful custom functions. There are four argument types: $d Door number (interchangeable with $a) $a Airlock number (interchangeable with $d) $r Room number $x Drone number Let's look at a couple simple examples to get a feel for a basic use of these arguments. cmd=open $d Use 1: cmd d12 Use 2: cmd a2 Notice that either a door or airlock can be specified. go=navigate $x $r Use 1: go 2 r12 Use 2: go r12 2 Notice that the ORDER of the arguments does not matter. Optional Arguments In the second example, both the drone argument and room argument are required, So even if you are commanding a drone in the Drone view, you have to explicitly state which drone you want to command. Optional arguments solve this problem. When you surround any parameter with parenthesis, it becomes optional. For example: go=navigate ($x) $r this modifies the 'go' alias so that when executed from Drone view, you only need to specify which room you want to go to. Nesting Aliases Consider the following example: go=navigate ($x) $r take=go 3 $r; tow 3; go 3 r1; tow 3 It's perfectly okay that we use the 'go' alias inside of the 'take' alias, as aliases essentially become their own commands. In this scenario drone 3 is our drone with the tow upgrade. Since the aliases are essentially equivalent to typing out the full command, they can be expanded as follows: 'take r13' 'go 3 r13; tow 3; go 3 r1; tow 3' 'navigate 3 r12; tow 3; navigate 3 r1; tow 3' In this case typing 'take r13' will move our towing drone (drone 3) to room r13, start towing an object in that room, tow the object back to room r1 (boarding vessel), and stop towing the object. You can see that using nested aliases along with required and optional arguments can be used to automate a lot of tedious command typing. Basic Commands *It is actually possible that the close command corrupts, which means that you can't close doors anymore. Advanced Commands Upgrades Both drone upgrades and ship upgrades are controlled by the console. Most upgrades can be controlled, but some upgrades are automatic, and have no associated commands (Ship Surveyor, Speed Boost, Quarantine Bypass, Long Range Scanner). The command for drone upgrades is simply the name of the upgrade. If no drone number is specified, the command will be execute by either the current robot (if in drone view and the current robot has the upgrade), or the only drone that has the upgrade (if in schematic view). if more than one drone has the upgrade, you will have to specify which drone(s) you want to execute the command. Category:Alpha v0.1 __FORCETOC__ Category:Gameplay